package cn.changein.framework.exception;

public class EnumException {

    public enum inventoryMaterialException {
        ADD_MATERIAL_STOCK_FAILED(1, "新增物料库存异常!"),
        UPDATE_MATERIAL_STOCK_FAILED(2, "修改物料库存异常!"),
        ADD_MATERIAL_HISTORY_FAILED(3, "批量新增物料库存操作记录失败!"),
        MATERIAL_UNDERSTOCK(4, "物料库存不足以扣减!"),
        NO_MATERIAL_STOCK(5, "未查询到物料库存信息!"),
        NO_OPERATION_TYPE(6, "未知的操作!"),
        MATERIAL_UPDATE_CHECK_COUNT_FAILED(7, "更新物料初盘数量失败!"),
        MATERIAL_PROFIT_AND_LOSS_COMMIT_FLAG_IS_COMMIT(8, "物料预盈亏单已经提交,不允许继续做初盘!"),
        NO_MATERIAL_DIFFERENCE_INFO(9, "未查询到物料预盈亏单信息!"),
        ;
        private int code;
        private String msg;

        inventoryMaterialException(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }

    public enum inventoryProductException {
        ADD_PRODUCT_STOCK_FAILED(1, "新增成品库存异常!"),
        UPDATE_PRODUCT_STOCK_FAILED(2, "修改成品库存异常!"),
        ADD_PRODUCT_HISTORY_FAILED(3, "批量新增成品库存操作记录失败!"),
        PRODUCT_UNDERSTOCK(4, "成品库存不足以扣减!"),
        NO_PRODUCT_STOCK(5, "未查询到成品库存信息!"),
        NO_OPERATION_TYPE(6, "未知的操作!"),
        PRODUCT_UPDATE_CHECK_COUNT_FAILED(7, "更新成品初盘数量失败!"),
        PRODUCT_PROFIT_AND_LOSS_COMMIT_FLAG_IS_COMMIT(8, "成品预盈亏单已经提交,不允许继续做初盘!"),
        NO_PRODUCT_DIFFERENCE_INFO(9, "未查询到成品预盈亏单信息!"),
        ;
        private int code;
        private String msg;

        inventoryProductException(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }
}
